package com.kn.keywordmatch.common;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum MediaTypeEnum {
// 1: '网站',
//         2: '纸媒',
//         3: '电视',
//         4: '微博',
//         5: '微信公众号',
//         6: '互动栏目',
//         7: '视频',
//         8: '移动客户端',
    WEBSITE(1,"网站"),
    PRINT_MEDIA(2,"纸媒"),
    TV(3,"电视"),
    MICRO_BLOG(4,"微博"),
    WECHAT_ACCOUNT(5,"微信公众号"),
    INTERACTIVE_SECTION(6,"互动栏目"),
    VIDEO(7,"视频"),
    MOBILE_CLIENT(8,"移动客户端");
    private Integer code;
    private String desc;

    public static String getDescByCode(int code){
        for (MediaTypeEnum value : MediaTypeEnum.values()) {
            if(value.code.equals(code)){
                return value.desc;
            }
        }
        return "";
    }
}
